export let FilterRoutes = (list, userInfo) => {
  let res = list.filter((item) => {
    item.meta.auth.forEach((items) => {
      items == userInfo;
    });
  });
  //   let res = list.filter((item) => item.meta.auth.indexOf(userInfo) !== -1);
  //   console.log(res);

  res.length > 0 &&
    res.forEach((item) => {
      if (item.children) {
        item.children = FilterRoutes(item.children, userInfo);
      }
    });

  return res;
};
